//
//  SalaryStrategy.m
//  DesignMode
//
//  Created by wangzhipan on 2024/9/9.
//

#import "SalaryStrategy.h"

@implementation CNSalary
- (double)salaryCalculateWithContent:(SalaryContent *)content
{
    double result = content.base;
    result -= content.base * content.rate;
    result += content.patent;
    return result;
}
@end

@implementation USSalary

- (double)salaryCalculateWithContent:(SalaryContent *)content
{
    double result = (content.base + content.patent) * 1.2;
    result -= content.base * content.rate;
    return result;
}

@end

@implementation DESalary

- (double)salaryCalculateWithContent:(SalaryContent *)content
{
    double result = (content.base + content.patent) * 1.1;
    result -= content.base * content.rate * 0.95;
    return result;
}
@end

@implementation FRSalary

- (double)salaryCalculateWithContent:(SalaryContent *)content
{
    double result = (content.base + content.patent) * 1.05;
    result -= result * content.rate * 0.98;
    return result;
}

@end
